package com.entrogy.service;

import com.alibaba.fastjson.JSONObject;
import com.entrogy.bean.*;

import java.util.List;

/**
 * @ClassName SalarySlipService
 * @Description
 * @Author luoxingjiang
 * @Date 2019/8/27 0027 下午 3:03
 * @Version 1.0
 **/
public interface SalarySlipService {

    boolean insertSalarySlipTemplate(SalarySlipTemplateEntity salarySlipTemplate);

    boolean updateSalarySlipTemplate(SalarySlipTemplateEntity salarySlipTemplate);

    List<SalarySlipTemplateEntity> listSalarySlipTemplate(Integer templateId, Integer enableStatus);

    boolean initSalaryData(List<JSONObject> userList, SalarySlipTemplateEntity salarySlipTemplate, Integer salaryYear, Integer salaryMonth);

    List<SalaryTeacherInfoEntity> listTeacherSalaryInfo(Integer salaryYear, Integer salaryMonth, Integer salaryInfoId, Integer schoolCode);

    List<SalaryTeacherInfoEntity> ListTeacherSalarySlipId(Integer salaryYear, Integer salaryMonth, String teacherId, Integer send, Integer readStatus, Integer confirmStatus, Integer recallStatus);

    boolean deleteTeacherSalaryDetail(Integer salaryTeacherDetail);

    boolean insertTeacherSalary(SalaryTeacherDetailEntity salaryTeacherDetail);

    boolean deleteTeacherSalaryInfo(Integer salaryTeacherInformationId);

    boolean insertSalaryInformation(SalaryTeacherInfoEntity salaryTeacherInfoEntity);

    Integer getSalarySlipTemplateIdBySchoolCode(Integer schoolCode);

    List<SalaryTeacherInfoEntity> listTeacherSalarySlipInfo(Integer schoolCode, Integer salaryYear, Integer salaryMonth, String userId);

    List<MonthSalaryStatusEntity> listMonthSalaryStatus(Integer schoolCode);

    boolean updateSalaryInfoStatus(Integer send, Integer readStatus, Integer confirmStatus, Integer recallStatus, Integer salaryInfoId);

    Integer countTeacherSalarySlip(Integer schoolCode, Integer salaryYear, Integer salaryMonth, String userId);

    List<String> listPhoneBySalaryInfoId(List<Integer> salaryInfoIdList);

    boolean updateSalaryDetail(UpdateTeacherSalaryEntity salaryTeacherDetailList);

    Integer countMonthSalary(Integer schoolCode);

    /**
     * 批量插入教师工资条数据
     * @param salaryTeacherDetailList
     * @return
     */
    boolean insertBatchSalary(List<SalaryTeacherDetailEntity> salaryTeacherDetailList);

    /**
     * 一键发送该月的所有工资条
     * @param salaryYear
     * @param salaryMonth
     * @param schoolCode
     * @return
     */
    List<Integer> listMonthSalaryInfoId(Integer salaryYear, Integer salaryMonth, Integer schoolCode);
}
